export const getQueryString = (name, str) => {
  if (!str) {
    return null
  }
  let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i')
  let r = str.match(reg)
  if (r != null) {
    return unescape(r[2])
  }
  return null
}
